package com.gycode.vpush.config.mq;

import com.aliyun.openservices.ons.api.PropertyKeyConst;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Properties;

@Component
public class MgrMqConfig {
    @Value("${rocketmq.accessKey}")
    private String accessKey;
    @Value("${rocketmq.secretKey}")
    private String secretKey;
    @Value("${rocketmq.nameSrvAddr}")
    private String nameSrvAddr;
    @Value("${rocketmq.crmGroupId}")
    private String crmGroupId;
    @Value("${rocketmq.crmMgrTopic}")
    private String crmMgrTopic;
    @Value("${rocketmq.crmMgrJiaXinTag}")
    private String crmMgrJiaXinTag;


    public Properties getMqPropertie() {
        Properties properties = new Properties();
        properties.setProperty(PropertyKeyConst.AccessKey, this.accessKey);
        properties.setProperty(PropertyKeyConst.SecretKey, this.secretKey);
        properties.setProperty(PropertyKeyConst.NAMESRV_ADDR, this.nameSrvAddr);
        return properties;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getNameSrvAddr() {
        return nameSrvAddr;
    }

    public void setNameSrvAddr(String nameSrvAddr) {
        this.nameSrvAddr = nameSrvAddr;
    }


    public String getCrmMgrTopic() {
        return crmMgrTopic;
    }

    public void setCrmMgrTopic(String crmMgrTopic) {
        this.crmMgrTopic = crmMgrTopic;
    }


    public String getCrmGroupId() {
        return crmGroupId;
    }

    public void setCrmGroupId(String crmGroupId) {
        this.crmGroupId = crmGroupId;
    }

    public String getCrmMgrJiaXinTag() {
        return crmMgrJiaXinTag;
    }

    public void setCrmMgrJiaXinTag(String crmMgrJiaXinTag) {
        this.crmMgrJiaXinTag = crmMgrJiaXinTag;
    }
}
